package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.mapper.TbUserMapper;
import com.example.demo.model.bo.TbUser;
import com.example.demo.service.UserService;
import org.springframework.stereotype.Service;

import java.util.Set;

@Service
public class UserServiceImpl extends ServiceImpl<TbUserMapper, TbUser> implements UserService {

    @Override
    public TbUser getUser(String username) {
        QueryWrapper<TbUser> wrapper = new QueryWrapper<>();
        wrapper.like("username", username);
        return this.getOne(wrapper);
    }

    @Override
    public Set<String> getRoles(String username) {
        return this.getRoles(username);
    }

    @Override
    public Set<String> getAuths(String username) {
        return this.getAuths(username);
    }
}
